package com.xyht.sca_s.student_manage_system.modules.personnelManagement.controller;


import com.xyht.sca_s.student_manage_system.common.commonReturn.ResponseResult;
import com.xyht.sca_s.student_manage_system.common.desEncodeAndDecode.annotation.SecretBody;
import com.xyht.sca_s.student_manage_system.modules.personnelManagement.entity.req.SmsBirthdayReminderAddReq;
import com.xyht.sca_s.student_manage_system.modules.personnelManagement.entity.req.SmsBirthdayReminderDeletedReq;
import com.xyht.sca_s.student_manage_system.modules.personnelManagement.entity.req.SmsBirthdayReminderUpdateReq;
import com.xyht.sca_s.student_manage_system.modules.personnelManagement.entity.req.SmsTeacherInfoUpdateBirthReq;
import com.xyht.sca_s.student_manage_system.modules.personnelManagement.service.SmsBirthdayReminderService;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 生日提醒 前端控制器
 * </p>
 *
 * @author XYHT
 * @since 2023-09-25
 */
@RestController
@RequestMapping("/personnelManagement/birthdayReminder")
@SecretBody
public class SmsBirthdayReminderController {

    @Autowired
    private SmsBirthdayReminderService birthdayReminderService;

    @ApiModelProperty("更新生日")
    @PostMapping("/updateTchBirth")
    public ResponseResult updateTchBirth(@RequestBody SmsTeacherInfoUpdateBirthReq updateBirthReq){
        return birthdayReminderService.updateTchBirth(updateBirthReq);
    }

    @ApiModelProperty("添加生日提醒")
    @PostMapping("/add")
    public ResponseResult addBirthdayReminder(@RequestBody SmsBirthdayReminderAddReq addReq){
        return birthdayReminderService.addBirthdayReminder(addReq);
    }

    @ApiModelProperty("查看生日提醒")
    @GetMapping("/detail")
    public ResponseResult getBirthdayReminder(){
        return birthdayReminderService.getBirthdayReminder();
    }

    @ApiModelProperty("修改生日提醒")
    @PostMapping("/update")
    public ResponseResult updateBirthdayReminder(@RequestBody SmsBirthdayReminderUpdateReq updateReq){
        return birthdayReminderService.updateBirthdayReminder(updateReq);
    }

    @ApiModelProperty("删除生日提醒")
    @PostMapping("/deleted")
    public ResponseResult deletedBirthdayReminder(@RequestBody SmsBirthdayReminderDeletedReq deletedReq){
        return birthdayReminderService.deletedBirthdayReminder(deletedReq);
    }

}

